import _ from 'lodash';
import './style.css';
import Icon from './icon.png';
import printMe from './print.js';

function component() {
	var element = document.createElement('div');

	element.innerHTML = _.join(['hello', 'webpack'], '');
	element.classList.add('hello');

	//添加图片
	var myIcon = new Image();
	myIcon.src = Icon;
	element.appendChild(myIcon);

	var btn = document.createElement('button');
	btn.innerHTML = 'printBtn';
	btn.onclick = printMe;
	element.appendChild(btn);


	return element;
}

document.body.appendChild(component());

if (module.hot) {
	module.hot.accept('./print.js', function () {
		console.log('Accepting the updated printMe module!0');
		printMe();
	})
}